//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<IGuiEffect.h>
///	@path	~/src/gui/
///	@date	2008/09/24
///	@brief	.

#pragma once

#include "xeres.h"

#include "object/IVar.h"

#include "graphics/animation/frame.h"
#include "graphics/RenderContext.h"

#include "gui/IGuiComp.h"

namespace xeres {

	// forward declaration
	class ITexture;

	/*! 
		\class	IGuiEffect
		\brief
	*/
	class IGuiEffect : public IObject
	{
	public:

		/// \ctor
		IGuiEffect( void );

		/// \dtor
		virtual ~IGuiEffect( void );

		DECL_IOBJECT_INTERFACE( IGuiEffect , IObject );

	public:

		/// \name Effect Interface.
		//@{

		/// \brief	Set effect component.
		virtual void SetComp( RefWeak<IGuiComp> comp ) = 0;

		/// \brief	Get effect component.
		virtual RefWeak<IGuiComp> GetComp( void ) = 0;

		/// \brief	Set param.
		virtual bool SetParam( const WString& name , Ref<IVar> val ) = 0;

		/// \brief	Get param.
		virtual RefPass<IVar> GetParam( const WString& name ) = 0;

		/// \brief	Get param list.
		virtual StringSeq GetParamList( void ) = 0;

		/// \brief	Reset effect.
		virtual void Reset( void ) = 0;

		/// \brief	Tick update (returning false indicates detach effect).
		virtual bool Tick( float dTime ) = 0;

		/// \brief	Render effect.
		virtual void Render( RenderContext& rc , RefWeak<ITexture> texture ) = 0;

		//@}
	};

} // namespace xeres
